package com.star.domain;

import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import org.springframework.stereotype.Repository;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author Star
 * @since 2021-04-21
 */
//@Data
@TableName("tb_user_login")
@Repository
public class  UserLogin extends Model<UserLogin> {

    private static final long serialVersionUID = 1L;

    /**
     * 登入编号
     */
    @TableId(value = "log_id", type = IdType.AUTO)
    private Integer logId;
    /**
     * 登入账号
     */
    private String logAccount;
    /**
     * 登入密码
     */
    @TableField("log_pass_Word")
    private String logPassWord;
    /**
     * 登入状态
     */
    private Integer logState;
    /**
     * 用户上一次登入时间
     */
    @TableField("log_last_Data")
    private Date logLastData;
    /**
     * 用户创建时间
     */
    @TableField("log_create_Data")
    private Date logCreateData;
    /**
     * 用户登入数据版本号
     */
    private Integer logVersion;
    /**
     * 当前用户对应的角色
     */
    private Role role;
    /**
     * 当前用户对应的用户信息 一对一
     */
    private UserInfo userInfo;

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Integer getLogId() {
        return logId;
    }

    public void setLogId(Integer logId) {
        this.logId = logId;
    }

    public String getLogAccount() {
        return logAccount;
    }

    public void setLogAccount(String logAccount) {
        this.logAccount = logAccount;
    }

    public String getLogPassWord() {
        return logPassWord;
    }

    public void setLogPassWord(String logPassWord) {
        this.logPassWord = logPassWord;
    }

    public Integer getLogState() {
        return logState;
    }

    public void setLogState(Integer logState) {
        this.logState = logState;
    }

    public Date getLogLastData() {
        return logLastData;
    }

    public void setLogLastData(Date logLastData) {
        this.logLastData = logLastData;
    }

    public Date getLogCreateData() {
        return logCreateData;
    }

    public void setLogCreateData(Date logCreateData) {
        this.logCreateData = logCreateData;
    }

    public Integer getLogVersion() {
        return logVersion;
    }

    public void setLogVersion(Integer logVersion) {
        this.logVersion = logVersion;
    }

    public Role getRole() {
        return role;
    }

    public void setRole(Role role) {
        this.role = role;
    }

    public UserInfo getUserInfo() {
        return userInfo;
    }

    public void setUserInfo(UserInfo userInfo) {
        this.userInfo = userInfo;
    }

    @Override
    public String toString() {
        return "UserLogin{" +
                "logId=" + logId +
                ", logAccount='" + logAccount + '\'' +
                ", logPassWord='" + logPassWord + '\'' +
                ", logState=" + logState +
                ", logLastData=" + logLastData +
                ", logCreateData=" + logCreateData +
                ", logVersion=" + logVersion +
                ", role=" + role +
                ", userInfo=" + userInfo +
                '}';
    }
}
